package mark.tom.sail;

class AnalyticsOperator {

    String mIdKey;                          // 标识码
    DataConverter mLogDataConvert;          // 日志文件数据转换器
    DataSecurity mLogDataSecurity;          // 日志文件数据安全性转换器
    FileGenerator mLogFileGenerator;        // 日志文件命名生成器
    FileStorage mLogFileStorage;            // 日志文件操作器
    LogInterceptor mLogInterceptor;         // 调试信息拦截器

    AnalyticsOperator(String mIdKey, DataConverter mLogDataConvert,
                      FileGenerator mLogFileGenerator,
                      FileStorage mLogFileStorage,
                      DataSecurity mLogDataSecurity,
                      LogInterceptor logInterceptor) {
        this.mIdKey = mIdKey;
        this.mLogDataConvert = mLogDataConvert;
        this.mLogFileGenerator = mLogFileGenerator;
        this.mLogFileStorage = mLogFileStorage;
        this.mLogDataSecurity = mLogDataSecurity;
        this.mLogInterceptor = logInterceptor;
    }

    boolean checkConfiguration() {
        return mIdKey != null && mIdKey.trim().length() > 0 && mLogDataConvert != null
                && mLogFileGenerator != null && mLogFileStorage != null && mLogDataSecurity != null;
    }
}
